package aom.fgi.api;

import aom.fgi.model.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @author HanXu
 * @date 2023/10/9
 **/
@RestController
@RequestMapping(value = "/user")
public class UserController {


    /**
     * 提供服务
     * @return
     */
    @GetMapping(value = "list")
    public List<User> list(){
        List<User> users = new ArrayList<User>();
        users.add(new User("奥巴马", "美国华盛顿", 65));
        users.add(new User("普京", "俄罗斯莫斯科", 63));
        return users;
    }
}
